3.1.79 \(\int \frac {\sin ^5(c+d x)}{a+b \sin ^2(c+d x)} \, dx\) [79]

Optimal. Leaf size=77 \[ -\frac {a^2 \tanh ^{-1}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{b^{5/2} \sqrt {a+b} d}+\frac {(a-b) \cos (c+d x)}{b^2 d}+\frac {\cos ^3(c+d x)}{3 b d} \]

[Out]

(a-b)*cos(d*x+c)/b^2/d+1/3*cos(d*x+c)^3/b/d-a^2*arctanh(cos(d*x+c)*b^(1/2)/(a+b)^(1/2))/b^(5/2)/d/(a+b)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3265, 398, 214} \begin {gather*} -\frac {a^2 \tanh ^{-1}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{b^{5/2} d \sqrt {a+b}}+\frac {(a-b) \cos (c+d x)}{b^2 d}+\frac {\cos ^3(c+d x)}{3 b d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sin[c + d*x]^5/(a + b*Sin[c + d*x]^2),x]

[Out]

-((a^2*ArcTanh[(Sqrt[b]*Cos[c + d*x])/Sqrt[a + b]])/(b^(5/2)*Sqrt[a + b]*d)) + ((a - b)*Cos[c + d*x])/(b^2*d)
+ Cos[c + d*x]^3/(3*b*d)

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 398

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Int[PolynomialDivide[(a + b*x^n)
^p, (c + d*x^n)^(-q), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && IGtQ[p, 0] && ILt
Q[q, 0] && GeQ[p, -q]

Rule 3265

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Cos[e + f*x], x]}, Dist[-ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos
[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \frac {\sin ^5(c+d x)}{a+b \sin ^2(c+d x)} \, dx &=-\frac {\text {Subst}\left (\int \frac {\left (1-x^2\right )^2}{a+b-b x^2} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {\text {Subst}\left (\int \left (-\frac {a-b}{b^2}-\frac {x^2}{b}+\frac {a^2}{b^2 \left (a+b-b x^2\right )}\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=\frac {(a-b) \cos (c+d x)}{b^2 d}+\frac {\cos ^3(c+d x)}{3 b d}-\frac {a^2 \text {Subst}\left (\int \frac {1}{a+b-b x^2} \, dx,x,\cos (c+d x)\right )}{b^2 d}\\ &=-\frac {a^2 \tanh ^{-1}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{b^{5/2} \sqrt {a+b} d}+\frac {(a-b) \cos (c+d x)}{b^2 d}+\frac {\cos ^3(c+d x)}{3 b d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 0.34, size = 150, normalized size = 1.95 \begin {gather*} \frac {6 a^2 \tan ^{-1}\left (\frac {\sqrt {b}-i \sqrt {a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a-b}}\right )+6 a^2 \tan ^{-1}\left (\frac {\sqrt {b}+i \sqrt {a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a-b}}\right )+\sqrt {-a-b} \sqrt {b} \cos (c+d x) (6 a-5 b+b \cos (2 (c+d x)))}{6 \sqrt {-a-b} b^{5/2} d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sin[c + d*x]^5/(a + b*Sin[c + d*x]^2),x]

[Out]

(6*a^2*ArcTan[(Sqrt[b] - I*Sqrt[a]*Tan[(c + d*x)/2])/Sqrt[-a - b]] + 6*a^2*ArcTan[(Sqrt[b] + I*Sqrt[a]*Tan[(c
+ d*x)/2])/Sqrt[-a - b]] + Sqrt[-a - b]*Sqrt[b]*Cos[c + d*x]*(6*a - 5*b + b*Cos[2*(c + d*x)]))/(6*Sqrt[-a - b]
*b^(5/2)*d)

________________________________________________________________________________________

Maple [A]
time = 0.27, size = 70, normalized size = 0.91

method result size
derivativedivides \(\frac {\frac {\frac {\left (\cos ^{3}\left (d x +c \right )\right ) b}{3}+a \cos \left (d x +c \right )-b \cos \left (d x +c \right )}{b^{2}}-\frac {a^{2} \arctanh \left (\frac {b \cos \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{b^{2} \sqrt {\left (a +b \right ) b}}}{d}\) \(70\)
default \(\frac {\frac {\frac {\left (\cos ^{3}\left (d x +c \right )\right ) b}{3}+a \cos \left (d x +c \right )-b \cos \left (d x +c \right )}{b^{2}}-\frac {a^{2} \arctanh \left (\frac {b \cos \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{b^{2} \sqrt {\left (a +b \right ) b}}}{d}\) \(70\)
risch \(\frac {a \,{\mathrm e}^{i \left (d x +c \right )}}{2 b^{2} d}-\frac {3 \,{\mathrm e}^{i \left (d x +c \right )}}{8 b d}+\frac {a \,{\mathrm e}^{-i \left (d x +c \right )}}{2 b^{2} d}-\frac {3 \,{\mathrm e}^{-i \left (d x +c \right )}}{8 b d}+\frac {i a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (d x +c \right )}}{\sqrt {-a b -b^{2}}}+1\right )}{2 \sqrt {-a b -b^{2}}\, d \,b^{2}}-\frac {i a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (d x +c \right )}}{\sqrt {-a b -b^{2}}}+1\right )}{2 \sqrt {-a b -b^{2}}\, d \,b^{2}}+\frac {\cos \left (3 d x +3 c \right )}{12 d b}\) \(215\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(d*x+c)^5/(a+sin(d*x+c)^2*b),x,method=_RETURNVERBOSE)

[Out]

1/d*(1/b^2*(1/3*cos(d*x+c)^3*b+a*cos(d*x+c)-b*cos(d*x+c))-a^2/b^2/((a+b)*b)^(1/2)*arctanh(b*cos(d*x+c)/((a+b)*
b)^(1/2)))

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 88, normalized size = 1.14 \begin {gather*} \frac {\frac {3 \, a^{2} \log \left (\frac {b \cos \left (d x + c\right ) - \sqrt {{\left (a + b\right )} b}}{b \cos \left (d x + c\right ) + \sqrt {{\left (a + b\right )} b}}\right )}{\sqrt {{\left (a + b\right )} b} b^{2}} + \frac {2 \, {\left (b \cos \left (d x + c\right )^{3} + 3 \, {\left (a - b\right )} \cos \left (d x + c\right )\right )}}{b^{2}}}{6 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)^5/(a+b*sin(d*x+c)^2),x, algorithm="maxima")

[Out]

1/6*(3*a^2*log((b*cos(d*x + c) - sqrt((a + b)*b))/(b*cos(d*x + c) + sqrt((a + b)*b)))/(sqrt((a + b)*b)*b^2) +
2*(b*cos(d*x + c)^3 + 3*(a - b)*cos(d*x + c))/b^2)/d

________________________________________________________________________________________

Fricas [A]
time = 0.41, size = 218, normalized size = 2.83 \begin {gather*} \left [\frac {2 \, {\left (a b^{2} + b^{3}\right )} \cos \left (d x + c\right )^{3} + 3 \, \sqrt {a b + b^{2}} a^{2} \log \left (-\frac {b \cos \left (d x + c\right )^{2} - 2 \, \sqrt {a b + b^{2}} \cos \left (d x + c\right ) + a + b}{b \cos \left (d x + c\right )^{2} - a - b}\right ) + 6 \, {\left (a^{2} b - b^{3}\right )} \cos \left (d x + c\right )}{6 \, {\left (a b^{3} + b^{4}\right )} d}, \frac {{\left (a b^{2} + b^{3}\right )} \cos \left (d x + c\right )^{3} + 3 \, \sqrt {-a b - b^{2}} a^{2} \arctan \left (\frac {\sqrt {-a b - b^{2}} \cos \left (d x + c\right )}{a + b}\right ) + 3 \, {\left (a^{2} b - b^{3}\right )} \cos \left (d x + c\right )}{3 \, {\left (a b^{3} + b^{4}\right )} d}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)^5/(a+b*sin(d*x+c)^2),x, algorithm="fricas")

[Out]

[1/6*(2*(a*b^2 + b^3)*cos(d*x + c)^3 + 3*sqrt(a*b + b^2)*a^2*log(-(b*cos(d*x + c)^2 - 2*sqrt(a*b + b^2)*cos(d*
x + c) + a + b)/(b*cos(d*x + c)^2 - a - b)) + 6*(a^2*b - b^3)*cos(d*x + c))/((a*b^3 + b^4)*d), 1/3*((a*b^2 + b
^3)*cos(d*x + c)^3 + 3*sqrt(-a*b - b^2)*a^2*arctan(sqrt(-a*b - b^2)*cos(d*x + c)/(a + b)) + 3*(a^2*b - b^3)*co
s(d*x + c))/((a*b^3 + b^4)*d)]

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)**5/(a+b*sin(d*x+c)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 173 vs. \(2 (67) = 134\).
time = 0.44, size = 173, normalized size = 2.25 \begin {gather*} \frac {\frac {3 \, a^{2} \arctan \left (\frac {b \cos \left (d x + c\right ) + a + b}{\sqrt {-a b - b^{2}} \cos \left (d x + c\right ) + \sqrt {-a b - b^{2}}}\right )}{\sqrt {-a b - b^{2}} b^{2}} - \frac {2 \, {\left (3 \, a - 2 \, b - \frac {6 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {6 \, b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {3 \, a {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}}{b^{2} {\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1\right )}^{3}}}{3 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)^5/(a+b*sin(d*x+c)^2),x, algorithm="giac")

[Out]

1/3*(3*a^2*arctan((b*cos(d*x + c) + a + b)/(sqrt(-a*b - b^2)*cos(d*x + c) + sqrt(-a*b - b^2)))/(sqrt(-a*b - b^
2)*b^2) - 2*(3*a - 2*b - 6*a*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 6*b*(cos(d*x + c) - 1)/(cos(d*x + c) + 1)
 + 3*a*(cos(d*x + c) - 1)^2/(cos(d*x + c) + 1)^2)/(b^2*((cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 1)^3))/d

________________________________________________________________________________________

Mupad [B]
time = 0.11, size = 72, normalized size = 0.94 \begin {gather*} \frac {\cos \left (c+d\,x\right )\,\left (\frac {a+b}{b^2}-\frac {2}{b}\right )}{d}+\frac {{\cos \left (c+d\,x\right )}^3}{3\,b\,d}-\frac {a^2\,\mathrm {atanh}\left (\frac {\sqrt {b}\,\cos \left (c+d\,x\right )}{\sqrt {a+b}}\right )}{b^{5/2}\,d\,\sqrt {a+b}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(c + d*x)^5/(a + b*sin(c + d*x)^2),x)

[Out]

(cos(c + d*x)*((a + b)/b^2 - 2/b))/d + cos(c + d*x)^3/(3*b*d) - (a^2*atanh((b^(1/2)*cos(c + d*x))/(a + b)^(1/2
)))/(b^(5/2)*d*(a + b)^(1/2))

________________________________________________________________________________________